package com.itheima.homework7;

import java.util.TreeSet;

public class Jiang {
    public static void main(String[] args) {
        String s = "90 -7 0 18 2 0 2 2 45 4";
        String[] s1 = s.split(" ");
        TreeSet<Integer> ts = new TreeSet<>((o1,o2)->{
            int result = o2-o1;
            result = result==0?1:result;
            return result;
        });
        for (int i = 0; i < s1.length; i++) {
            ts.add(Integer.valueOf(s1[i]));
        }
        System.out.println(ts);
    }
}
